package com._520it.crm.mapper;

import com._520it.crm.domain.Employee;
import com._520it.crm.query.EmployeeQueryObject;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);
    int insert(Employee record);
    Employee selectByPrimaryKey(Long id);
    List<Employee> selectAll();
    int updateByPrimaryKey(Employee record);
    Integer queryforCount(EmployeeQueryObject qo);
    List<Employee> queryforList(EmployeeQueryObject qo);

    void insertRoleRelation(@Param("employeeId") Long employeeId, @Param("roleId") Long roleId);

    /**
     * 删除对应的员工的对应关系
     * @param id
     */
    void deleteRoleRelation(Long id);
}